define(['jquery', 'knockout', './router', 'bootstrap', 'knockout-projections', 'localization'], function($, ko, router) {
  // “jqxknockout.js” takes the “ko” dependency from window. 
  // While using requirejs knockout “ko” entry point is not exposed into the window object.
  var root = ( typeof window === 'object' && window ) || this;
	root.ko = ko;
  
  ko.postbox = new ko.subscribable();   
  // Components can be packaged as AMD modules, such as the following:
  ko.components.register('navbar', { require: 'components/navbar/navbar' });
  ko.components.register('nav-bar', { require: 'components/nav-bar/nav-bar' });
  ko.components.register('ref-win', { require: 'components/ref-win/ref-win' });
  ko.components.register('qs-win',  { require: 'components/qs-win/qs-win' });
  
  ko.components.register('productline-editor', { require: 'components/home-page/productline-editor' });
  ko.components.register('home-page', { require: 'components/home-page/home' });
  ko.components.register('account-editor', { require: 'components/auth/account-editor' });
  ko.components.register('accounts', { require: 'components/auth/accounts' });
  ko.components.register('multipart', { require: 'components/multipart/multipart' });
  ko.components.register('echarts-bar',  { require: 'components/echarts-bar/echarts-bar' });
  
  // ... or for template-only components, you can just point to a .html file directly:
  ko.components.register('about-page', {
    template: { require: 'text!components/about-page/about.html' }
  });

  

  ko.components.register('side-bar', { require: 'components/side-bar/side-bar' });
    
  // [Scaffolded component registrations will be inserted here. To retain this feature, don't remove this comment.]

  // Start the application
     $(document.body).ready(function () {
        ko.applyBindings({ route: router.currentRoute });
    });
    
  
});
